package com.jt.mapper;

import com.jt.pojo.User;
import org.apache.ibatis.annotations.CacheNamespace;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

// 测试注解开发
@Mapper
@CacheNamespace // 使用注解二级缓存
public interface UserAnnoMapper {
    @Select("select * from demo_user")
    List<User> findAll();

    @Select("select * from demo_user where id = #{id}")
    User findById(int id);

    @Select("select * from demo_user")
    List<User> findCache1();
}
